package com.allwees.bs.core.model.logistics.entity;

import com.allwees.bs.core.modelbase.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * 物流运单
 *
 * @author yangylsky
 * @since 2019-12-07
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@MappedSuperclass
public abstract class LogisticsWaybillModel extends BaseEntity {

	private static final long serialVersionUID = -667521616270235010L;



	protected String orderItemUuid;

	protected String orderUuid;
	/**
	 * 运单号码
	 */
	@Column(length = 48)
	protected String expressCode;
	/**
	 * 物流商代码
	 */
	@Column(length = 20)
	protected String carrierCode;

	/**
	 * 运单物流跟踪明细（Json格式）
	 */
	@Column(columnDefinition = "text")
	protected String trackingDetail;

	/**
	 * 是否已配送
	 */
	protected Boolean delivered;

	/**
	 * 发货日期
	 */
	@Temporal(TemporalType.DATE)
	protected Date shippingDate;

	/**
	 * 配送日期
	 */
	@Temporal(TemporalType.DATE)
	protected Date deliverDate;

	/**
	 * 运单物流跟踪明细最后更新时间
	 */
	protected Date trackingModifyDate;

	protected Date createdAt;

	protected Date updatedAt;
}
